Skip to content

README: Fix Django compatibility #1901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

marcelometal
Copy link

HI,
Semantic versioning says to not introduce breaking change without releasing a new major version.

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make incompatible API changes
MINOR version when you add functionality in a backward compatible manner
PATCH version when you make backward compatible bug fixes
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

Drop Django 4 support in 4.3.0 is a breaking change.

In the future, please change the major version and not the minor version.

@tim-schilling
Copy link
Member

The toolbar still supports django 4.2. I don't agree dropping support for release points necessitates bumping the major version. Django's release strategy means you should be able to upgrade from 4.0 to 4.1 to 4.2 relatively easily.

@marcelometal
Copy link
Author

Hi @tim-schilling ,

After updating to 4.3.0:

Traceback (most recent call last):
  File "/home/user/.virtualenvs/blah/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.virtualenvs/blah/lib/python3.11/site-packages/debug_toolbar/middleware.py", line 69, in __call__
    panel.generate_stats(request, response)
  File "/home/user/.virtualenvs/blah/lib/python3.11/site-packages/debug_toolbar/panels/templates/panel.py", line 196, in generate_stats
    template_data["context_list"] = self.process_context_list(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.virtualenvs/blah/lib/python3.11/site-packages/debug_toolbar/panels/templates/panel.py", line 137, in process_context_list
    if hasattr(value, "_wrapped"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.virtualenvs/blah/lib/python3.11/site-packages/material/base.py", line 136, in __getattr__
    container_size = int(container_size)
                     ^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'wrapped'

My local dependencies:

  • Django==4.2.11
  • django-material==1.11.3

@tim-schilling
Copy link
Member

I don't think this is a valid PR given the toolbar supports v4.2, so I'm going to close it.

Regarding the exception, if you'd like help with debugging it, please create a minimal environment that reproduces the problem. As a note, it appears that https://github.com/viewflow/django-material was archived in February and is no longer maintained. The last supported version of Django looks to be v4.1.

@marcelometal
Copy link
Author

I don't think this is a valid PR given the toolbar supports v4.2, so I'm going to close it.

Ok, but that bug only occurs when I use django-debug-toolbar 4.3.0

Regarding the exception, if you'd like help with debugging it, please create a minimal environment that reproduces the problem. As a note, it appears that https://github.com/viewflow/django-material was archived in February and is no longer maintained. The last supported version of Django looks to be v4.1.

I will try to create a minimal environment that reproduces the problem. But, as I said, installing django-debug-toolbar 4.2.0 there is no error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants